package edu.biwu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/product")
public class ProductController {

    /**
     * @return
     * @RequestMapping: path属性(value属性):可以绑定多个请求路径
     *                  method = RequestMethod.POST: 只处理POST请求,不处理GET请求
     */
//    @RequestMapping({"/list.do","/product/list.do"})
//    @RequestMapping(method = RequestMethod.GET,path = "/list.do")
//    @PostMapping("/list.do")
    @GetMapping("/list.do")
    public ModelAndView product(){
        return new ModelAndView("productList");
    }

}
